<h1>DefineVideo</h1>

<p>DefineVideo is used to display video within a Flash file. Video objects contain 
a unique identifier and are treated in the same way as shapes, buttons, images, 
etc. The video data displayed is define using the VideoFrame instruction. Each 
frame of video is displayed whenever display list is updated using the ShowFrame 
instruction - any timing information stored within the video data is ignored.</p>

<p>DefineVideo is defined with the following information:</p>
 
<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top">type</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">10</td>
<td>Identifies the DefineVideo command when it is encoded. It is encoded 
with the length field as a 16-bit integer (Little-endian byte order).</td>
</tr>

<tr>
<td nowrap valign="top">length</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">6</td>
<td>The length in bytes of the body of the instruction when it is encoded. If the 
length is greater than 62 then this field is set to 0x3F and the length is encoded 
using the extendedLength field. Encoded with the type field as a 16-bit integer.</td>
</tr>

<tr>
<td nowrap valign="top">extendedLength</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">32</td>
<td>Optional. Contains the length in bytes of the encoded instruction if it is
greater than 62 bytes. If the length is 62 bytes or less then this field is 
omitted.</td>
</tr>

<tr>
<td nowrap valign="top">identifier</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>A unique number that identifies the definition within the Flash file.</td>
</tr>

<tr>
<td nowrap valign="top">frameCount</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>The number of frames that will be displayed.</td>
</tr>

<tr>
<td nowrap valign="top">width</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>Width of each frame in pixels</td>
</tr>

<tr>
<td nowrap valign="top">height</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">16</td>
<td>Height of each frame in pixels.</td>
</tr>

<tr>
<td nowrap valign="top">reserved</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">5</td>
<td>Reserved.</td>
</tr>

<tr>
<td nowrap valign="top">deblocking</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">2</td>
<td>Whether a filter is used when assembling the blocks of video data into a frame. 
This may be set to Off to turn off the deblock filter in the Flash Player; On to 
turn on the Flash Player's filter or UseVideo to allow the video data to specify 
whether the deblocking filter is used.</td>
</tr>

<tr>
<td nowrap valign="top">smoothing</td>
<td nowrap valign="top">boolean</td>
<td nowrap valign="top" align="right">1</td>
<td>Controls whether the Plash Player performs smoothing to increase the quality 
of the image displayed albeit at the price of performance.</td>
</tr>

<tr>
<td nowrap valign="top">codec</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">8</td>
<td>Identifies the format of the video data either H263 for data encoded 
using the Sorenson modified H263 format or ScreenVideo for data 
encoded using Macromedia's Screen Video format.</td>
</tr>
</table>

<p>The ScreenVideo format was introduced in Flash 7, only the H263 format was 
supported in Flash 6.</p>

<h2>History</h2>

<p>The DefineVideo class represents the DefineVideo of the Macromedia Flash (SWF) 
File Format Specification. It was introduced in Flash 6. The ScreenVideo format 
was introduced in Flash 7.</p>
